﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace class1
{//在DeliveryRobot中添加一个代表连续工作时长的字段hours。
    class DeliveryRobot:Robot
    {
        protected  double hours;
        public double Hours
        {
            get { return this.hours; }
            set { this.hours = value; }
        }
        public DeliveryRobot(string name, double hours)
           : base(name)
        {
            this.hours = hours;
        }

        public DeliveryRobot()
        {
        }

        public override void Working()
        {
            Console.WriteLine("你好，我是："+this.name);
            Console.WriteLine("我的工作时长为："+this.hours);
            Console.WriteLine("你的菜好了，正在为你服务！");
        }
    }
}
